/*
 * @version: vue3
 * @Author: lxs
 * @Date: 2022-04-27 15:07:03
 * @LastEditors: sueRimn
 * @LastEditTime: 2022-04-29 16:24:37
 */
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import Layout from "@/Layout/index.vue";
export const routes: Array<RouteRecordRaw> = [
  {
    path: "/login",
    component: () => import("@/views/login/Login.vue"),
    name: "login"
  },
  {
    path: "/",
    component: Layout,
    redirect: "/dashboard",
    meta:{isMenu:true,title: "首页"},
    children: [
      {
        path: "/dashboard",
        component: () => import("@/Layout/dashboard/Index.vue"),
        name: "dashboard",
        meta: {
            isMenu:false,
          title: "首页",
          icon: "HomeFilled",
        },
      },
    ],
  },
  {
    path: "/system",
    component: Layout,
    name: "system",
    meta: {
        isMenu:true,
      title: "系统管理",
      icon: "Files",
      roles: ["sys:manage"],
      parentId: 0,
    },
    children: [
      {
        path: "/department",
        component: () => import("@/views/system/department/department.vue"),
        name: "department",
        meta: {
            isMenu:true,
          title: "机构管理",
          icon: "Document",
          roles: ["sys:dept"],
        },
      },
      {
        path: "/userList",
        component: () => import("@/views/system/User/UserList.vue"),
        name: "userList",
        meta: {
            isMenu:true,
          title: "用户管理",
          icon: "Document",
          roles: ["sys:user"],
        },
      },
      {
        path: "/roleList",
        component: () => import("@/views/system/Role/RoleList.vue"),
        name: "roleList",
        meta: {
            isMenu:true,
          title: "角色管理",
          icon: "Document",
          roles: ["sys:role"],
        },
      },
      {
        path: "/menuList",
        component: () => import("@/views/system/Menu/MenuList.vue"),
        name: "menuList",
        meta: {
            isMenu:true,
          title: "权限管理",
          icon: "Document",
          roles: ["sys:menu"],
        },
      },
    ],
  },
  {
    path: "/map",
    component: Layout,
    name: "map",
    meta: {
        isMenu:true,
      title: "地图",
      icon: "Files",
      roles: ["sys:map"],
    },
    children: [
      {
        path: "/map/select",
        component: () =>
          import("@/views/map/select.vue"),
        name: "map.select",
        meta: {
            isMenu:true,
          title: "select",
          icon: "Document",
          roles: ["sys:map.select"],
        },
      },{
        path: "/map/draw",
        component: () =>
          import("@/views/map/draw.vue"),
        name: "map.draw",
        meta: {
            isMenu:true,
          title: "draw",
          icon: "Document",
          roles: ["sys:map.draw"],
        },
      },{
        path: "/map/draw2",
        component: () =>
          import("@/views/map/draw2.vue"),
        name: "map.draw2",
        meta: {
            isMenu:true,
          title: "draw2",
          icon: "Document",
          roles: ["sys:map.draw2"],
        },
      },{
        path: "/map/draw3",
        component: () =>
          import("@/views/map/draw3.vue"),
        name: "map.draw3",
        meta: {
            isMenu:true,
          title: "地图",
          icon: "Document",
          roles: ["sys:map.draw3"],
        },
      },{
        path: "/map/setMarker",
        component: () =>
          import("@/views/map/setMarker.vue"),
        name: "map.setMarker",
        meta: {
            isMenu:true,
          title: "setMarker",
          icon: "Document",
          roles: ["sys:map.setMarker"],
        },
      },{
        path: "/map/addFeature",
        component: () =>
          import("@/views/map/addFeature.vue"),
        name: "map.addFeature",
        meta: {
            isMenu:true,
          title: "addFeature",
          icon: "Document",
          roles: ["sys:map.addFeature"],
        },
      },{
        path: "/map/addDraw",
        component: () =>
          import("@/views/map/addDraw.vue"),
        name: "map.addDraw",
        meta: {
            isMenu:true,
          title: "addDraw",
          icon: "Document",
          roles: ["sys:map.addDraw"],
        },
      },{
        path: "/map/addOverlay",
        component: () =>
          import("@/views/map/addOverlay.vue"),
        name: "map.addOverlay",
        meta: {
            isMenu:true,
          title: "addOverlay",
          icon: "Document",
          roles: ["sys:map.addOverlay"],
        },
      },{
        path: "/map/measure",
        component: () =>
          import("@/views/map/measure.vue"),
        name: "map.measure",
        meta: {
            isMenu:true,
          title: "measure",
          icon: "Document",
          roles: ["sys:map.measure"],
        },
      },{
        path: "/map/shapQuery",
        component: () =>
          import("@/views/map/shapQuery.vue"),
        name: "map.shapQuery",
        meta: {
            isMenu:true,
          title: "shapQuery",
          icon: "Document",
          roles: ["sys:map.shapQuery"],
        },
      },{
        path: "/map/getPoint",
        component: () =>
          import("@/views/map/getPoint.vue"),
        name: "map.getPoint",
        meta: {
            isMenu:true,
          title: "getPoint",
          icon: "Document",
          roles: ["sys:map.getPoint"],
        },
      },{
        path: "/map/index1",
        component: () =>
          import("@/views/map/index1.vue"),
        name: "map.index1",
        meta: {
            isMenu:true,
          title: "地图1",
          icon: "Document",
          roles: ["sys:map.index1"],
        },
      },{
        path: "/map/districtPolygon",
        component: () =>
          import("@/views/map/districtPolygon.vue"),
        name: "map.districtPolygon",
        meta: {
            isMenu:true,
          title: "districtPolygon",
          icon: "Document",
          roles: ["sys:map.districtPolygon"],
        },
      },{
        path: "/map/dragBoxSelect",
        component: () =>
          import("@/views/map/dragBoxSelect.vue"),
        name: "map.dragBoxSelect",
        meta: {
            isMenu:true,
          title: "dragBoxSelect",
          icon: "Document",
          roles: ["sys:map.dragBoxSelect"],
        },
      },
    ],
  },
  {
    path: "/three",
    component: Layout,
    name: "three",
    meta: {
        isMenu:true,
      title: "three",
      icon: "Files",
      roles: ["sys:three"],
    },
    children: [{
        path: "/three/index",
        component: () => import("@/views/three/index.vue"),
        name: "three.index",
        meta: {
            isMenu:true,
          title: "three",
          icon: "Document",
          roles: ["sys:three"],
        },
      },{
        path: "/three/one",
        component: () => import("@/views/three/one.vue"),
        name: "three.one",
        meta: {
            isMenu:true,
          title: "three one",
          icon: "Document",
          roles: ["sys:three"],
        },
      },
      {        
        path: "/three/two",
        component: () => import("@/views/three/two.vue"),
        name: "three.two",
        meta: {
            isMenu:true,
          title: "three two",
          icon: "Document",
          roles: ["sys:document"],
        },
      },
    ],
  },
  {
    path: "/antvx6",
    component: Layout,
    name: "antvx6",
    meta: {
        isMenu:true,
      title: "antvx6",
      icon: "Files",
      roles: ["sys:antvx6"],
    },
    children: [{
        path: "/antvx6/index",
        component: () => import("@/views/antvx6/index.vue"),
        name: "antvx6.index",
        meta: {
            isMenu:true,
          title: "antvx6",
          icon: "Document",
          roles: ["sys:antvx6"],
        },
      },{
        path: "/antvx6/one",
        component: () => import("@/views/antvx6/one.vue"),
        name: "antvx6.one",
        meta: {
            isMenu:true,
          title: "antvx6 one",
          icon: "Document",
          roles: ["sys:antvx6"],
        },
      },
      {        
        path: "/antvx6/two",
        component: () => import("@/views/antvx6/two.vue"),
        name: "antvx6.two",
        meta: {
            isMenu:true,
          title: "antvx6 two",
          icon: "Document",
          roles: ["sys:document"],
        },
      },
    ],
  },
];
const router = createRouter({
  history: createWebHashHistory(),
  routes,
});
export default router;
